package nl.stroep.classbuilder.utils 
{
	/**
	 * ...
	 * @author Mark Knol - Stroep.nl - 2010 (c)
	 */
	public class XMLUtil
	{
		public static function getNode(name:String, value:*):XML
		{
			var retval:XML;
			
			if (typeof(value) == "string")
			{
				retval = new XML("<" + name + "><![CDATA[" + (value?value:"") + "]]></" + name + ">");
			}
			else
			{
				retval = new XML("<" + name + ">" + (value?value:"") + "</" + name + ">");
			}
			return retval;
		}
	}

}